﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Solution.Business.Entities;

namespace Solution.Data
{
   public class LocationDAC
    {
        SolutionEntities context = SolutionEntities.Context;
        public List<Location> Location_GetByTop(string Top, string Where, string Ord)
        {
            var list = context.Location_GetByTop(Top, Where, Ord);
            return list.ToList();
        }

        public void Location_Insert(Location location)
        {
            context.Location_Insert(location.Name, location.Level, location.Link, location.LGroup, location.Active, location.Tag);
        }

        public void Location_Update(Location location)
        {
            context.Location_Update(location.LId, location.Name, location.Level, location.Link, location.LGroup, location.Active, location.Tag);
        }
    }
}
